﻿
/*----------------------------------------------------------------//
// 文件名：MoRefereeCouncil.cs
// 文件功能描述：实体 MoRefereeCouncil.
// 
// 创建标识：Template  ver 5.0.20090429 2009-07-10
//
// 修改标识：
// 修改描述：
//----------------------------------------------------------------*/
#region MoRefereeCouncil
using System;
using System.Data;
namespace Las.Model
{
	/// <summary>
	/// 业务实体MoRefereeCouncil
	/// </summary>
	public partial class MoRefereeCouncil:ICloneable
	{
		#region 表RefereeCouncil的字段
		private string chargeBranchId;
		private int chargeType;
		private string personId;
		private string militaryId;
		private string fullname;
		private int sex;
		private string fromBranchId;
		private string position;
		private string class1;
		private string class2;
		#endregion
		
		#region 构造函数
		public MoRefereeCouncil()
		{
			           	    
		   
		}
		#endregion
		
		#region 拷贝构造函数

		public MoRefereeCouncil(MoRefereeCouncil item)
		{
			item.CopyTo(this);
		}
		#endregion
		
		#region 带参数构造函数
	    public MoRefereeCouncil(string chargeBranchId,int chargeType,string personId,string militaryId,string fullname,int sex,string fromBranchId,string position,string class1,string class2)
		{
		this.chargeBranchId=chargeBranchId;
		this.chargeType=chargeType;
		this.personId=personId;
		this.militaryId=militaryId;
		this.fullname=fullname;
		this.sex=sex;
		this.fromBranchId=fromBranchId;
		this.position=position;
		this.class1=class1;
		this.class2=class2;
		}
		#endregion
		
		#region 表RefereeCouncil的字段属性
		/// <summary>
		/// CHARGE_BRANCH_ID
		/// </summary>
		public string ChargeBranchId
		{
			get {return chargeBranchId;}
			set {chargeBranchId=value;}
		}
		/// <summary>
		/// CHARGE_TYPE
		/// </summary>
		public int ChargeType
		{
			get {return chargeType;}
			set {chargeType=value;}
		}
		/// <summary>
		/// PERSON_ID
		/// </summary>
		public string PersonId
		{
			get {return personId;}
			set {personId=value;}
		}
		/// <summary>
		/// MILITARY_ID
		/// </summary>
		public string MilitaryId
		{
			get {return militaryId;}
			set {militaryId=value;}
		}
		/// <summary>
		/// FULLNAME
		/// </summary>
		public string Fullname
		{
			get {return fullname;}
			set {fullname=value;}
		}
		/// <summary>
		/// SEX
		/// </summary>
		public int Sex
		{
			get {return sex;}
			set {sex=value;}
		}
		/// <summary>
		/// FROM_BRANCH_ID
		/// </summary>
		public string FromBranchId
		{
			get {return fromBranchId;}
			set {fromBranchId=value;}
		}
		/// <summary>
		/// POSITION
		/// </summary>
		public string Position
		{
			get {return position;}
			set {position=value;}
		}
		/// <summary>
		/// CLASS1
		/// </summary>
		public string Class1
		{
			get {return class1;}
			set {class1=value;}
		}
		/// <summary>
		/// CLASS2
		/// </summary>
		public string Class2
		{
			get {return class2;}
			set {class2=value;}
		}
		#endregion
		
		#region 辅助函数
		/// <summary>
		/// 拷贝函数
		/// </summary>
		public MoRefereeCouncil CopyTo(MoRefereeCouncil item)
        {
		    item.chargeBranchId=this.chargeBranchId;
		    item.chargeType=this.chargeType;
		    item.personId=this.personId;
		    item.militaryId=this.militaryId;
		    item.fullname=this.fullname;
		    item.sex=this.sex;
		    item.fromBranchId=this.fromBranchId;
		    item.position=this.position;
		    item.class1=this.class1;
		    item.class2=this.class2;
			return item;
        }
		/// <summary>
		/// 克隆函数
		/// </summary>		
		public object Clone()
        {
            MoRefereeCouncil mo=new MoRefereeCouncil();
		    mo.ChargeBranchId=this.ChargeBranchId;
		    mo.ChargeType=this.ChargeType;
		    mo.PersonId=this.PersonId;
		    mo.MilitaryId=this.MilitaryId;
		    mo.Fullname=this.Fullname;
		    mo.Sex=this.Sex;
		    mo.FromBranchId=this.FromBranchId;
		    mo.Position=this.Position;
		    mo.Class1=this.Class1;
		    mo.Class2=this.Class2;
			return mo;
		}
				///<summary>
		///判断对象是否相等
		///<summary>
		public override bool Equals(object obj)
        {		 
            if (object.ReferenceEquals(this,obj))
            {
                return true;
            }
            else
            {
                MoRefereeCouncil NewRefereeCouncil = obj as MoRefereeCouncil;
                if (NewRefereeCouncil == null)
                {
                    return false;
                }
                else
                {
				if (NewRefereeCouncil.ChargeBranchId==this.ChargeBranchId && NewRefereeCouncil.ChargeType==this.ChargeType && NewRefereeCouncil.PersonId==this.PersonId && NewRefereeCouncil.MilitaryId==this.MilitaryId && NewRefereeCouncil.Fullname==this.Fullname && NewRefereeCouncil.Sex==this.Sex && NewRefereeCouncil.FromBranchId==this.FromBranchId && NewRefereeCouncil.Position==this.Position && NewRefereeCouncil.Class1==this.Class1 && NewRefereeCouncil.Class2==this.Class2)		
					{
                        return true; 
                    }
                }

            }
            return false;
            
        }
		///TODO:you should modify GetHashCode by yourself.
		public override int GetHashCode()
		{
			return base.GetHashCode();
		} 

		public override string ToString()
        {
		   return String.Format(System.Globalization.CultureInfo.InvariantCulture,"ChargeBranchId={0}/ChargeType={1}/PersonId={2}/MilitaryId={3}/Fullname={4}/Sex={5}/FromBranchId={6}/Position={7}/Class1={8}/Class2={9}",chargeBranchId,chargeType,personId,militaryId,fullname,sex,fromBranchId,position,class1,class2);
		 
		}
		#endregion
		
		
		#region DataTable Help Function
		///<summary>
		///DataRow转换成Model
		///</summary>
		public void Row2Model(DataRow row)
		{
		    if(row["Charge_Branch_ID"]!=null && row["Charge_Branch_ID"]!=DBNull.Value)
			{
			    this.ChargeBranchId = (string)row["Charge_Branch_ID"];
			}
			else
			{
				this.ChargeBranchId =string.Empty;
			}
		    if(row["Charge_Type"]!=null && row["Charge_Type"]!=DBNull.Value)
			{
			    this.ChargeType = (int)row["Charge_Type"];
			}
			else
			{
				this.ChargeType =0;
			}
		    if(row["Person_ID"]!=null && row["Person_ID"]!=DBNull.Value)
			{
			    this.PersonId = (string)row["Person_ID"];
			}
			else
			{
				this.PersonId =string.Empty;
			}
		    if(row["Military_ID"]!=null && row["Military_ID"]!=DBNull.Value)
			{
			    this.MilitaryId = (string)row["Military_ID"];
			}
			else
			{
				this.MilitaryId =string.Empty;
			}
		    if(row["Fullname"]!=null && row["Fullname"]!=DBNull.Value)
			{
			    this.Fullname = (string)row["Fullname"];
			}
			else
			{
				this.Fullname =string.Empty;
			}
		    if(row["Sex"]!=null && row["Sex"]!=DBNull.Value)
			{
			    this.Sex = (int)row["Sex"];
			}
			else
			{
				this.Sex =0;
			}
		    if(row["From_Branch_ID"]!=null && row["From_Branch_ID"]!=DBNull.Value)
			{
			    this.FromBranchId = (string)row["From_Branch_ID"];
			}
			else
			{
				this.FromBranchId =string.Empty;
			}
		    if(row["Position"]!=null && row["Position"]!=DBNull.Value)
			{
			    this.Position = (string)row["Position"];
			}
			else
			{
				this.Position =string.Empty;
			}
		    if(row["Class1"]!=null && row["Class1"]!=DBNull.Value)
			{
			    this.Class1 = (string)row["Class1"];
			}
			else
			{
				this.Class1 =string.Empty;
			}
		    if(row["Class2"]!=null && row["Class2"]!=DBNull.Value)
			{
			    this.Class2 = (string)row["Class2"];
			}
			else
			{
				this.Class2 =string.Empty;
			}
		}
		
		///<summary>
		///Model转换成DataRow
		///</summary>
	　　public void Model2Row(DataRow row)
		{
			row["Charge_Branch_ID"] = this.ChargeBranchId;
			row["Charge_Type"] = this.ChargeType;
			row["Person_ID"] = this.PersonId;
			row["Military_ID"] = this.MilitaryId;
			row["Fullname"] = this.Fullname;
			row["Sex"] = this.Sex;
			row["From_Branch_ID"] = this.FromBranchId;
			row["Position"] = this.Position;
			row["Class1"] = this.Class1;
			row["Class2"] = this.Class2;
		}
		#endregion
	}
}
#endregion
